package com.base.cn.platform.os.dao.course.cou;

import com.base.cn.platform.os.common.mybatis.BaseDao;
import com.base.cn.platform.os.entity.course.cou.Course;
import com.base.cn.platform.os.entity.course.cou.CourseCondition;
import com.base.cn.platform.os.entity.course.count.CourseSumCount;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 课程Dao
 *
 * @author s.li
 * @create 2018-04-17-10:54
 */
@Mapper
public interface CourseDao extends BaseDao<Course> {

    /**
     * 查询套餐选择课程列表
     * @param clazz
     * @param condition
     * @return Page<Course>
     */
    Page<Course> findPackageSelectCourseList(@Param("clazz") Class<Course> clazz, @Param("condition")CourseCondition condition);

    /**
     * 查询课程总数量数据
     * @param clazz
     * @return CourseSumCount
     */
    CourseSumCount queryCourseSumCount(@Param("clazz") Class<Course> clazz);

    void  updateCourseColumnNull  (@Param("clazz") Class<Course> clazz, @Param("param") Map param);

    /**
     * 查询课程归属的套餐列表
     * @param courseId
     * @return
     */
    List<Course> findPackageByCourseId(@Param("courseId") BigDecimal courseId);

}
